<style scoped lang="scss">
.content {
    width: 90%;
    height: calc(100vh - 50px);
    // background: #ccc;
    margin: auto;

    dl {
        display: flex;
        border: 1px solid #ccc;
        margin-top: 20px;

        dt {
            img {
                padding: 10px;
            }
        }

        dd {
            padding-left: 10px;
            line-height: 30px;
            .p1{
                display: flex;
                position: absolute;
                right: 35px;
                margin-top: 20px;
            }
            .p2{
                display: flex;
                position: absolute;
                right: 35px;
                margin-top: 60px;
            }
        }
    }
}
</style>
<template>
    <div>
        <homeTop :showspan5="true"></homeTop>
        <div class="content">
            <dl v-for="(item,index) in listData" :key="index">
                <dt>
                    <img style="width: 100px;height: 100px;" :src="item.giftPic" alt="">
                </dt>
                <dd>
                    <p class="p1">{{ item.userNickName }}</p>
                    <p class="p2">{{ item.sendTime }}</p>
                </dd>
            </dl>
        </div>
    </div>

</template>
<script setup lang="ts">
import homeTop from '@/components/homeTop/index.vue'
import { getGiftList } from '@/api/homeapi/index'
import { reactive, ref } from 'vue';
const doctorId:any = localStorage.getItem('doctorId') as string
const sessionId = JSON.parse(localStorage.getItem('sessionId') as string)
const page = ref(1)
const count = ref(10)
const config = reactive({
    page: page.value,
    count: count.value
})
const listData:any = ref([])
getGiftList(doctorId, sessionId, config).then(res => {
    console.log(res);
    listData.value = res.data.result
})
</script>